﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

#nullable disable

namespace T4.Console.Db.Models
{
    [Table("Blog_PersonLabel_Map")]
    [Index(nameof(PersonLabelId), nameof(BlogId), Name = "AK_KEY_2_Blog_PersonLabel_Map", IsUnique = true)]
    [Index(nameof(PersonLabelId), nameof(BlogId), Name = "Index_1")]
    public partial class Blog_PersonLabel_Map
    {
        [Key]
        [StringLength(36)]
        public string Id { get; set; }
        [Required]
        [StringLength(36)]
        public string BlogId { get; set; }
        [Required]
        [StringLength(36)]
        public string PersonLabelId { get; set; }
        [StringLength(36)]
        public string CreatedBy { get; set; }
        [Column(TypeName = "datetime")]
        public DateTime? CreatedTime { get; set; }
        [StringLength(36)]
        public string LastModifiedBy { get; set; }
        [Column(TypeName = "datetime")]
        public DateTime? LastModifiedTime { get; set; }

        [ForeignKey(nameof(BlogId))]
        [InverseProperty(nameof(Blog_Info.Blog_PersonLabel_Maps))]
        public virtual Blog_Info Blog { get; set; }
        [ForeignKey(nameof(PersonLabelId))]
        [InverseProperty(nameof(Blog_PersonLabel.Blog_PersonLabel_Maps))]
        public virtual Blog_PersonLabel PersonLabel { get; set; }
    }
}
